package hu.mapro.gwtui.client.model;

import java.util.Date;

import com.google.gwt.cell.client.Cell;
import com.google.gwt.cell.client.DateCell;
import com.google.gwt.cell.client.TextCell;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;

public abstract class DateProperty<T> extends AbstractDisplayableProperty<T, Date> {

	public DateProperty(String propertyName, String label,
			DisplaySize displaySize) {
		super(propertyName, label, displaySize);
	}

	public DateProperty(String propertyName, String label) {
		super(propertyName, label);
	}

	@Override
	public Cell<Date> getDisplayField() {
		return new DateCell(DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_SHORT));
	}

}
